home *** CD-ROM | disk | FTP | other *** search
/ Master Visual Basic 3 / Master Visual Basic 3 (SAMS Publishing) (1994).ISO / mvprog / original / ch14 / mytable.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1994-03-19  |  3.0 KB  |  110 lines

  1. VERSION 2.00
  2. Begin Form frmMyTable 
  3.    Caption         =   "The MyTable Program"
  4.    ClientHeight    =   4935
  5.    ClientLeft      =   1095
  6.    ClientTop       =   1485
  7.    ClientWidth     =   7365
  8.    Height          =   5340
  9.    Icon            =   MYTABLE.FRX:0000
  10.    Left            =   1035
  11.    LinkTopic       =   "Form1"
  12.    ScaleHeight     =   4935
  13.    ScaleWidth      =   7365
  14.    Top             =   1140
  15.    Width           =   7485
  16.    Begin TextBox txtData 
  17.       Height          =   495
  18.       Left            =   5760
  19.       TabIndex        =   2
  20.       Top             =   3720
  21.       Width           =   1215
  22.    End
  23.    Begin CommandButton cmdExit 
  24.       Caption         =   "E&xit"
  25.       Height          =   495
  26.       Left            =   480
  27.       TabIndex        =   1
  28.       Top             =   4320
  29.       Width           =   1215
  30.    End
  31.    Begin Grid Grid1 
  32.       Cols            =   6
  33.       Height          =   3255
  34.       Left            =   480
  35.       Rows            =   5
  36.       TabIndex        =   0
  37.       Top             =   120
  38.       Width           =   6735
  39.    End
  40.    Begin Image Image2 
  41.       Height          =   1215
  42.       Left            =   2160
  43.       Top             =   3480
  44.       Visible         =   0   'False
  45.       Width           =   1215
  46.    End
  47.    Begin Image Image1 
  48.       Height          =   1260
  49.       Left            =   3480
  50.       Picture         =   MYTABLE.FRX:0302
  51.       Top             =   3480
  52.       Visible         =   0   'False
  53.       Width           =   1320
  54.    End
  55. Option Explicit
  56. Sub cmdExit_Click ()
  57.     End
  58. End Sub
  59. Sub Form_Load ()
  60.     Dim Counter
  61.     ' Set the current row to 0.
  62.     Grid1.Row = 0
  63.     ' Write into row #0, col#1
  64.     Grid1.Col = 1
  65.     Grid1.Text = "January"
  66.     ' Write into row #0, col#2
  67.     Grid1.Col = 2
  68.     Grid1.Text = "February"
  69.     ' Write into row #0, col#3
  70.     Grid1.Col = 3
  71.     Grid1.Text = "March"
  72.     ' Write into row #0, col#4
  73.     Grid1.Col = 4
  74.     Grid1.Text = "April"
  75.     ' Write into row #0, col#5
  76.     Grid1.Col = 5
  77.     Grid1.Text = "May"
  78.     ' Write into row #1, col#0
  79.     Grid1.Row = 1
  80.     Grid1.Col = 0
  81.     Grid1.Text = "Electricity"
  82.     ' Write into row #2, col#0
  83.     Grid1.Row = 2
  84.     Grid1.Text = "Water"
  85.     ' Write into row #3, col#0
  86.     Grid1.Row = 3
  87.     Grid1.Text = "Books"
  88.     For Counter = 0 To 5 Step 1
  89.         Grid1.ColWidth(Counter) = 1500
  90.     Next
  91.     ' Fill the (0,0) cell with a picture.
  92.     Grid1.Row = 0
  93.     Grid1.Col = 0
  94.     Grid1.Picture = Image1.Picture
  95.     Grid1.ColWidth(0) = Image1.Width
  96.     Grid1.RowHeight(0) = Image1.Height
  97.     ' Fill the (1,1) cell with a picture of a book
  98.     Image2.Picture = LoadPicture("C:\MVPROG\BMP\FACE1.BMP")
  99.     Grid1.Row = 1
  100.     Grid1.Col = 1
  101.     Grid1.Picture = Image2.Picture
  102.     Grid1.ColWidth(1) = Image2.Width
  103.     Grid1.RowHeight(1) = Image2.Height
  104.     Grid1.ColWidth(1) = Grid1.ColWidth(1) + 1500
  105.     Grid1.Text = "This is FACE1.BMP"
  106. End Sub
  107. Sub Grid1_Click ()
  108.     Grid1.Text = txtData.Text
  109. End Sub
  110.